import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/locationroom/` + url, ...arg)

/**
 * 房间Api接口管理器
 *
 * @author kongxm
 * @date  2022/11/06 22:26
 **/
export default {
	// 获取房间分页
	bizLocationRoomPage(data) {
		return request('page', data, 'get')
	},
	// 获取房间列表
	bizLocationRoomList(data) {
		return request('list', data, 'get')
	},
	// 提交房间表单 edit为true时为编辑，默认为新增
	bizLocationRoomSubmitForm(data, edit = false) {
		return request(edit ? 'add' : 'edit', data)
	},
	// 删除房间
	bizLocationRoomDelete(data) {
		return request('delete', data)
	},
	// 获取房间详情
	bizLocationRoomDetail(data) {
		return request('detail', data, 'get')
	}
}
